{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from magic_point import SuperPointNet\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy\n",
    "from dataset import SyntheticData\n",
    "from torch.utils.data import DataLoader"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "net = SuperPointNet()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "net = torch.load(\"/home/luo3300612/Workspace/PycharmWS/mySuperPoint/superpoint/model/result/epoch375\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "dataset_root = '/home/luo3300612/Workspace/PycharmWS/mySuperPoint/superpoint/dataset/data'\n",
    "\n",
    "first_dir_names = ['draw_checkerboard',\n",
    "             'draw_cube',\n",
    "             'draw_ellipses',\n",
    "             'draw_lines',\n",
    "             'draw_multiple_polygons',\n",
    "             'draw_polygon',\n",
    "             'draw_star',\n",
    "             'draw_stripes',\n",
    "             'gaussian_noise']\n",
    "\n",
    "second_images_dir_name = 'images'\n",
    "second_pts_dir_name = 'points'\n",
    "\n",
    "dataset_dir_name = {'train':'training','test':'test','val':'validation'}\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_csv = '/home/luo3300612/Workspace/PycharmWS/mySuperPoint/superpoint/model/training.csv'\n",
    "test_csv = '/home/luo3300612/Workspace/PycharmWS/mySuperPoint/superpoint/model/test.csv'\n",
    "val_csv = '/home/luo3300612/Workspace/PycharmWS/mySuperPoint/superpoint/model/validation.csv'\n",
    "\n",
    "train_data = SyntheticData(train_csv,dataset_root)\n",
    "batch_size = 16\n",
    "train_loader = DataLoader(train_data,\n",
    "                          batch_size=batch_size,\n",
    "                          shuffle=True,\n",
    "                          num_workers=4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "def visualize_heatmap(img,outputs,alpha=0.0000050):\n",
    "    plt.figure()\n",
    "    plt.subplot(121)\n",
    "    \n",
    "    img = np.squeeze(img)\n",
    "    \n",
    "    plt.imshow(img,cmap='gray')\n",
    "    \n",
    "    outputs = np.squeeze(outputs.detach().numpy())\n",
    "    outputs = np.exp(outputs)\n",
    "    \n",
    "    outputs = outputs/np.sum(outputs)\n",
    "    \n",
    "    outputs = outputs[:-1,:,:]\n",
    "    outputs = outputs.reshape(8,8,15,20)\n",
    "    outputs = outputs.transpose([2,0,3,1])\n",
    "    outputs = outputs.reshape(120,160)\n",
    "    \n",
    "    x,y=np.where(outputs>=alpha)\n",
    "    print('max point:',x,y)\n",
    "    plt.scatter(y,x)\n",
    "    \n",
    "    plt.subplot(122)\n",
    "    plt.imshow(outputs)\n",
    "    print(outputs)\n",
    "    print(f\"max :{np.max(outputs):.7f}\")\n",
    "    print(f\"min :{np.min(outputs):.7f}\")\n",
    "    print(\"dim :\",outputs.shape)\n",
    "    print(\"sum :\",np.sum(outputs))\n",
    "    print(\"dim1 sum:\",np.sum(outputs,axis=0))\n",
    "    \n",
    "def output2heatmap(outputs):\n",
    "    outputs = np.squeeze(outputs.detach().numpy())\n",
    "    outputs = np.exp(outputs)\n",
    "    \n",
    "    outputs = outputs/(np.sum(outputs)+0.00001)\n",
    "    \n",
    "    outputs = outputs[:-1,:,:]\n",
    "    outputs = outputs.reshape(8,8,15,20)\n",
    "    outputs = outputs.transpose([2,0,3,1])\n",
    "    outputs = outputs.reshape(120,160)\n",
    "    return outputs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "H,W = 120,160\n",
    "Hc,Wc = int(H/8),int(W/8)\n",
    "\n",
    "def sample_output():\n",
    "    for i,sample in enumerate(train_loader):\n",
    "        imgs = sample['img'].view((-1,1,H,W))\n",
    "        labels = sample['label']\n",
    "        print(imgs.shape)\n",
    "        outputs = net(imgs)\n",
    "        \n",
    "        if i == 0:\n",
    "            return imgs,labels,outputs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([16, 1, 120, 160])\n"
     ]
    }
   ],
   "source": [
    "imgs,labels,outputs = sample_output()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "img = imgs[0]\n",
    "label = labels[0]\n",
    "output = outputs[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[64, 64, 64, 64, 64, 64, 64, 64, 64, 28, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 51,  2, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64,  5, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 35, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 45, 64, 33,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64,  5, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 33, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 17, 10, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  4, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64,  2, 64, 64, 64, 64, 64, 64, 64, 64, 64, 41, 64, 25, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 49, 39, 64, 64, 52, 64, 64, 64, 64, 64, 64, 64,  6, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  6,  4,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 13, 23, 64, 64, 64, 64, 64, 64, 64, 64, 64,  3, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  1,\n",
       "         64, 64]])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "label"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64],\n",
       "        [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n",
       "         64, 64]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "output.argmax(dim=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "from torch.utils.data import Dataset\n",
    "import pandas as pd\n",
    "import os\n",
    "import numpy as np\n",
    "\n",
    "class SyntheticData2(Dataset):\n",
    "    def __init__(self,csv_file,dataset_root,save_point=False):\n",
    "        self.csv = pd.read_csv(csv_file)\n",
    "        self.dataset_root = dataset_root\n",
    "        self.save_point = save_point\n",
    "        \n",
    "    def __len__(self):\n",
    "        return len(self.csv)\n",
    "    \n",
    "    def __getitem__(self, idx):\n",
    "        item = self.csv.iloc[idx]\n",
    "        img_path = os.path.join(self.dataset_root,item['imgs_path'])\n",
    "        pt_path = os.path.join(self.dataset_root,item['pts_path'])\n",
    "        img = plt.imread(img_path)\n",
    "        pt = np.load(pt_path)\n",
    "        if self.save_point:            \n",
    "            sample = {'img':img,'label':point2label2(pt),'pt':pt}\n",
    "        else:\n",
    "            sample = {'img':img,'label':point2label2(pt)}\n",
    "        return sample\n",
    "    \n",
    "def point2label2(pts):\n",
    "    label = np.zeros((H,W),dtype=int)\n",
    "    pts = pts.astype(int)\n",
    "#     print(pts)\n",
    "#     print(pts.shape)\n",
    "    label[pts[:,0],pts[:,1]] = 1\n",
    "    label = label.reshape((Hc,8,Wc,8))\n",
    "    label = label.transpose((0,2,1,3))\n",
    "    label = label.reshape((Hc,Wc,64))\n",
    "    label = np.concatenate((2*label,np.ones((Hc,Wc,1),dtype=int)),axis=2)\n",
    "    label = np.argmax(label,axis=2)\n",
    "    return label\n",
    "\n",
    "def label2point(label):\n",
    "    ret = []\n",
    "    for i in range(Hc):\n",
    "        for j in range(Wc):\n",
    "            if label[i,j]!=64:\n",
    "                x = label[i,j] // 8 + i*8\n",
    "                y = label[i,j] % 8 + j*8\n",
    "                ret.append([x,y])\n",
    "    return np.array(ret)\n",
    "\n",
    "def visulize(img,label=None,pt=None):\n",
    "    img = img.squeeze()\n",
    "    plt.imshow(img,cmap='gray')\n",
    "    plt.axis('off')\n",
    "    if label is not None:\n",
    "        for i in range(Hc):\n",
    "            for j in range(Wc):\n",
    "                x,y = i*8,j*8\n",
    "                if label[i,j] == 64:\n",
    "                    continue\n",
    "                k,l = label[i,j] // 8,int(label[i,j])%8\n",
    "                plt.gca().add_patch(plt.Rectangle((y,x),8,8,color='r',fill=False,linewidth=2))\n",
    "    if pt is not None and len(pt) != 0:\n",
    "        plt.scatter(pt[:,1],pt[:,0])\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_data1 = SyntheticData(train_csv,dataset_root)\n",
    "train_data2 = SyntheticData2(train_csv,dataset_root)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "  0%|          | 0/90000 [00:00<?, ?it/s]\u001b[A\n",
      "  0%|          | 88/90000 [00:00<01:42, 877.23it/s]\u001b[A\n",
      "  0%|          | 182/90000 [00:00<01:40, 894.88it/s]\u001b[A\n",
      "  0%|          | 291/90000 [00:00<01:34, 944.38it/s]\u001b[A\n",
      "  0%|          | 401/90000 [00:00<01:31, 984.15it/s]\u001b[A\n",
      "  1%|          | 510/90000 [00:00<01:28, 1013.47it/s]\u001b[A\n",
      "  1%|          | 618/90000 [00:00<01:26, 1032.00it/s]\u001b[A\n",
      "  1%|          | 727/90000 [00:00<01:25, 1047.91it/s]\u001b[A\n",
      "  1%|          | 837/90000 [00:00<01:24, 1061.19it/s]\u001b[A\n",
      "  1%|          | 948/90000 [00:00<01:23, 1072.69it/s]\u001b[A\n",
      "  1%|          | 1060/90000 [00:01<01:21, 1086.27it/s]\u001b[A\n",
      "  1%|▏         | 1167/90000 [00:01<01:22, 1074.96it/s]\u001b[A\n",
      "  1%|▏         | 1279/90000 [00:01<01:21, 1086.90it/s]\u001b[A\n",
      "  2%|▏         | 1392/90000 [00:01<01:20, 1099.07it/s]\u001b[A\n",
      " 52%|█████▏    | 47156/90000 [01:50<01:14, 573.90it/s]\u001b[A\n",
      "  2%|▏         | 1615/90000 [00:01<01:20, 1097.30it/s]\u001b[A\n",
      "  2%|▏         | 1725/90000 [00:01<01:20, 1096.39it/s]\u001b[A\n",
      "  2%|▏         | 1836/90000 [00:01<01:20, 1097.35it/s]\u001b[A\n",
      "  2%|▏         | 1946/90000 [00:01<01:22, 1072.45it/s]\u001b[A\n",
      "  2%|▏         | 2054/90000 [00:01<01:25, 1029.29it/s]\u001b[A\n",
      "  2%|▏         | 2158/90000 [00:02<01:26, 1011.96it/s]\u001b[A\n",
      "  3%|▎         | 2268/90000 [00:02<01:24, 1035.44it/s]\u001b[A\n",
      "  3%|▎         | 2381/90000 [00:02<01:22, 1060.79it/s]\u001b[A\n",
      "  3%|▎         | 2493/90000 [00:02<01:21, 1075.36it/s]\u001b[A\n",
      "  3%|▎         | 2606/90000 [00:02<01:20, 1089.93it/s]\u001b[A\n",
      "  3%|▎         | 2716/90000 [00:02<01:20, 1088.28it/s]\u001b[A\n",
      "  3%|▎         | 2826/90000 [00:02<01:20, 1087.10it/s]\u001b[A\n",
      "  3%|▎         | 2935/90000 [00:02<01:20, 1085.09it/s]\u001b[A\n",
      "  3%|▎         | 3044/90000 [00:02<01:24, 1028.36it/s]\u001b[A\n",
      "  3%|▎         | 3148/90000 [00:02<01:29, 972.76it/s] \u001b[A\n",
      "  4%|▎         | 3249/90000 [00:03<01:28, 982.56it/s]\u001b[A\n",
      "  4%|▎         | 3359/90000 [00:03<01:25, 1012.44it/s]\u001b[A\n",
      "  4%|▍         | 3471/90000 [00:03<01:23, 1040.25it/s]\u001b[A\n",
      "  4%|▍         | 3583/90000 [00:03<01:21, 1062.16it/s]\u001b[A\n",
      "  4%|▍         | 3695/90000 [00:03<01:20, 1078.75it/s]\u001b[A\n",
      "  4%|▍         | 3804/90000 [00:03<01:20, 1072.10it/s]\u001b[A\n",
      "  4%|▍         | 3914/90000 [00:03<01:19, 1080.05it/s]\u001b[A\n",
      "  4%|▍         | 4024/90000 [00:03<01:19, 1084.21it/s]\u001b[A\n",
      "  5%|▍         | 4135/90000 [00:03<01:18, 1090.85it/s]\u001b[A\n",
      "  5%|▍         | 4247/90000 [00:03<01:18, 1098.40it/s]\u001b[A\n",
      "  5%|▍         | 4357/90000 [00:04<01:19, 1083.19it/s]\u001b[A\n",
      "  5%|▍         | 4466/90000 [00:04<01:22, 1041.24it/s]\u001b[A\n",
      "  5%|▌         | 4571/90000 [00:04<01:24, 1011.82it/s]\u001b[A\n",
      "  5%|▌         | 4681/90000 [00:04<01:22, 1034.72it/s]\u001b[A\n",
      "  5%|▌         | 4794/90000 [00:04<01:20, 1058.69it/s]\u001b[A\n",
      "  5%|▌         | 4903/90000 [00:04<01:19, 1067.31it/s]\u001b[A\n",
      "  6%|▌         | 5013/90000 [00:04<01:19, 1074.72it/s]\u001b[A\n",
      "  6%|▌         | 5122/90000 [00:04<01:18, 1078.71it/s]\u001b[A\n",
      "  6%|▌         | 5233/90000 [00:04<01:18, 1085.37it/s]\u001b[A\n",
      "  6%|▌         | 5343/90000 [00:05<01:17, 1089.41it/s]\u001b[A\n",
      "  6%|▌         | 5453/90000 [00:05<01:21, 1036.25it/s]\u001b[A\n",
      "  6%|▌         | 5558/90000 [00:05<01:23, 1013.87it/s]\u001b[A\n",
      "  6%|▋         | 5662/90000 [00:05<01:22, 1020.58it/s]\u001b[A\n",
      "  6%|▋         | 5765/90000 [00:05<01:25, 983.41it/s] \u001b[A\n",
      "  7%|▋         | 5864/90000 [00:05<01:27, 964.92it/s]\u001b[A\n",
      "  7%|▋         | 5962/90000 [00:05<01:26, 966.16it/s]\u001b[A\n",
      "  7%|▋         | 6065/90000 [00:05<01:25, 981.05it/s]\u001b[A\n",
      "  7%|▋         | 6164/90000 [00:05<01:26, 973.15it/s]\u001b[A\n",
      "  7%|▋         | 6263/90000 [00:05<01:25, 977.93it/s]\u001b[A\n",
      "  7%|▋         | 6375/90000 [00:06<01:22, 1016.01it/s]\u001b[A\n",
      "  7%|▋         | 6488/90000 [00:06<01:19, 1045.32it/s]\u001b[A\n",
      "  7%|▋         | 6602/90000 [00:06<01:17, 1070.12it/s]\u001b[A\n",
      "  7%|▋         | 6715/90000 [00:06<01:16, 1086.32it/s]\u001b[A\n",
      "  8%|▊         | 6829/90000 [00:06<01:15, 1100.98it/s]\u001b[A\n",
      "  8%|▊         | 6940/90000 [00:06<01:15, 1094.73it/s]\u001b[A\n",
      "  8%|▊         | 7050/90000 [00:06<01:15, 1095.48it/s]\u001b[A\n",
      "  8%|▊         | 7160/90000 [00:06<01:16, 1087.84it/s]\u001b[A\n",
      "  8%|▊         | 7269/90000 [00:06<01:19, 1045.94it/s]\u001b[A\n",
      "  8%|▊         | 7375/90000 [00:07<01:21, 1010.70it/s]\u001b[A\n",
      "  8%|▊         | 7486/90000 [00:07<01:19, 1037.55it/s]\u001b[A\n",
      "  8%|▊         | 7598/90000 [00:07<01:17, 1059.73it/s]\u001b[A\n",
      "  9%|▊         | 7708/90000 [00:07<01:16, 1069.03it/s]\u001b[A\n",
      "  9%|▊         | 7819/90000 [00:07<01:16, 1080.39it/s]\u001b[A\n",
      "  9%|▉         | 7928/90000 [00:07<01:15, 1082.50it/s]\u001b[A\n",
      "  9%|▉         | 8038/90000 [00:07<01:15, 1086.80it/s]\u001b[A\n",
      "  9%|▉         | 8149/90000 [00:07<01:14, 1092.41it/s]\u001b[A\n",
      "  9%|▉         | 8259/90000 [00:07<01:14, 1090.89it/s]\u001b[A\n",
      "  9%|▉         | 8369/90000 [00:07<01:17, 1048.11it/s]\u001b[A\n",
      "  9%|▉         | 8475/90000 [00:08<01:18, 1032.57it/s]\u001b[A\n",
      " 10%|▉         | 8581/90000 [00:08<01:18, 1040.15it/s]\u001b[A\n",
      " 10%|▉         | 8689/90000 [00:08<01:17, 1050.76it/s]\u001b[A\n",
      " 10%|▉         | 8795/90000 [00:08<01:22, 982.47it/s] \u001b[A\n",
      " 10%|▉         | 8895/90000 [00:08<01:25, 944.38it/s]\u001b[A\n",
      " 10%|▉         | 8999/90000 [00:08<01:23, 970.26it/s]\u001b[A\n",
      " 10%|█         | 9109/90000 [00:08<01:20, 1005.40it/s]\u001b[A\n",
      " 10%|█         | 9221/90000 [00:08<01:18, 1034.27it/s]\u001b[A\n",
      " 10%|█         | 9329/90000 [00:08<01:17, 1045.97it/s]\u001b[A\n",
      " 10%|█         | 9442/90000 [00:08<01:15, 1066.82it/s]\u001b[A\n",
      " 11%|█         | 9555/90000 [00:09<01:14, 1084.47it/s]\u001b[A\n",
      " 11%|█         | 9669/90000 [00:09<01:13, 1099.64it/s]\u001b[A\n",
      " 11%|█         | 9782/90000 [00:09<01:12, 1106.29it/s]\u001b[A\n",
      " 11%|█         | 9895/90000 [00:09<01:11, 1113.13it/s]\u001b[A\n",
      " 11%|█         | 10008/90000 [00:09<01:11, 1115.21it/s]\u001b[A\n",
      " 11%|█         | 10120/90000 [00:09<01:12, 1105.09it/s]\u001b[A\n",
      " 11%|█▏        | 10231/90000 [00:09<01:15, 1063.45it/s]\u001b[A\n",
      " 11%|█▏        | 10338/90000 [00:09<01:21, 977.83it/s] \u001b[A\n",
      " 12%|█▏        | 10438/90000 [00:09<01:23, 949.13it/s]\u001b[A\n",
      " 12%|█▏        | 10547/90000 [00:10<01:20, 986.71it/s]\u001b[A\n",
      " 12%|█▏        | 10656/90000 [00:10<01:18, 1014.42it/s]\u001b[A\n",
      " 12%|█▏        | 10764/90000 [00:10<01:16, 1032.50it/s]\u001b[A\n",
      " 12%|█▏        | 10873/90000 [00:10<01:15, 1047.64it/s]\u001b[A\n",
      " 12%|█▏        | 10982/90000 [00:10<01:14, 1057.95it/s]\u001b[A\n",
      " 12%|█▏        | 11090/90000 [00:10<01:14, 1063.72it/s]\u001b[A\n",
      " 12%|█▏        | 11200/90000 [00:10<01:13, 1072.49it/s]\u001b[A\n",
      " 13%|█▎        | 11310/90000 [00:10<01:12, 1078.13it/s]\u001b[A\n",
      " 13%|█▎        | 11419/90000 [00:10<01:14, 1058.74it/s]\u001b[A\n",
      " 13%|█▎        | 11528/90000 [00:10<01:13, 1065.18it/s]\u001b[A\n",
      " 13%|█▎        | 11635/90000 [00:11<01:14, 1057.58it/s]\u001b[A\n",
      " 13%|█▎        | 11741/90000 [00:11<01:14, 1055.11it/s]\u001b[A\n",
      " 13%|█▎        | 11853/90000 [00:11<01:12, 1071.98it/s]\u001b[A\n",
      " 13%|█▎        | 11965/90000 [00:11<01:11, 1085.87it/s]\u001b[A\n",
      " 13%|█▎        | 12077/90000 [00:11<01:11, 1093.75it/s]\u001b[A\n",
      " 14%|█▎        | 12187/90000 [00:11<01:13, 1062.65it/s]\u001b[A\n",
      " 14%|█▎        | 12294/90000 [00:11<01:16, 1011.60it/s]\u001b[A\n",
      " 14%|█▍        | 12396/90000 [00:11<01:18, 985.79it/s] \u001b[A\n",
      " 14%|█▍        | 12496/90000 [00:11<01:18, 988.45it/s]\u001b[A\n",
      " 14%|█▍        | 12601/90000 [00:11<01:16, 1005.89it/s]\u001b[A\n",
      " 14%|█▍        | 12702/90000 [00:12<01:18, 990.71it/s] \u001b[A\n",
      " 14%|█▍        | 12802/90000 [00:12<01:19, 976.89it/s]\u001b[A\n",
      " 14%|█▍        | 12903/90000 [00:12<01:18, 984.45it/s]\u001b[A\n",
      " 14%|█▍        | 13011/90000 [00:12<01:16, 1009.32it/s]\u001b[A\n",
      " 15%|█▍        | 13123/90000 [00:12<01:14, 1038.57it/s]\u001b[A\n",
      " 15%|█▍        | 13234/90000 [00:12<01:12, 1057.41it/s]\u001b[A\n",
      " 15%|█▍        | 13341/90000 [00:12<01:12, 1058.94it/s]\u001b[A\n",
      " 15%|█▍        | 13448/90000 [00:12<01:18, 979.97it/s] \u001b[A\n",
      " 15%|█▌        | 13548/90000 [00:12<01:20, 950.39it/s]\u001b[A\n",
      " 15%|█▌        | 13645/90000 [00:13<01:22, 921.56it/s]\u001b[A\n",
      " 15%|█▌        | 13739/90000 [00:13<01:23, 913.56it/s]\u001b[A\n",
      " 15%|█▌        | 13848/90000 [00:13<01:19, 959.08it/s]\u001b[A\n",
      " 15%|█▌        | 13946/90000 [00:13<01:18, 964.40it/s]\u001b[A\n",
      " 16%|█▌        | 14044/90000 [00:13<01:18, 965.55it/s]\u001b[A\n",
      " 16%|█▌        | 14152/90000 [00:13<01:16, 996.16it/s]\u001b[A\n",
      " 16%|█▌        | 14262/90000 [00:13<01:13, 1025.12it/s]\u001b[A\n",
      " 16%|█▌        | 14375/90000 [00:13<01:11, 1053.31it/s]\u001b[A\n",
      " 16%|█▌        | 14483/90000 [00:13<01:11, 1059.46it/s]\u001b[A\n",
      " 16%|█▌        | 14594/90000 [00:13<01:10, 1072.53it/s]\u001b[A\n",
      " 16%|█▋        | 14702/90000 [00:14<01:12, 1032.54it/s]\u001b[A\n",
      " 16%|█▋        | 14806/90000 [00:14<01:13, 1019.46it/s]\u001b[A\n",
      " 17%|█▋        | 14912/90000 [00:14<01:12, 1030.74it/s]\u001b[A\n",
      " 17%|█▋        | 15016/90000 [00:14<01:13, 1023.12it/s]\u001b[A\n",
      " 17%|█▋        | 15125/90000 [00:14<01:12, 1039.75it/s]\u001b[A\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 17%|█▋        | 15230/90000 [00:14<01:14, 1007.33it/s]\u001b[A\n",
      " 17%|█▋        | 15332/90000 [00:14<01:14, 1001.81it/s]\u001b[A\n",
      " 17%|█▋        | 15433/90000 [00:14<01:16, 977.61it/s] \u001b[A\n",
      " 17%|█▋        | 15539/90000 [00:14<01:14, 998.29it/s]\u001b[A\n",
      " 17%|█▋        | 15646/90000 [00:15<01:12, 1018.59it/s]\u001b[A\n",
      " 18%|█▊        | 15750/90000 [00:15<01:12, 1022.91it/s]\u001b[A\n",
      " 18%|█▊        | 15853/90000 [00:15<01:13, 1010.65it/s]\u001b[A\n",
      " 18%|█▊        | 15955/90000 [00:15<01:13, 1009.72it/s]\u001b[A\n",
      " 18%|█▊        | 16063/90000 [00:15<01:12, 1026.89it/s]\u001b[A\n",
      " 18%|█▊        | 16168/90000 [00:15<01:11, 1031.59it/s]\u001b[A\n",
      " 18%|█▊        | 16274/90000 [00:15<01:11, 1038.01it/s]\u001b[A\n",
      " 18%|█▊        | 16384/90000 [00:15<01:09, 1053.23it/s]\u001b[A\n",
      " 18%|█▊        | 16492/90000 [00:15<01:09, 1060.58it/s]\u001b[A\n",
      " 18%|█▊        | 16599/90000 [00:15<01:11, 1027.85it/s]\u001b[A\n",
      " 19%|█▊        | 16703/90000 [00:16<01:12, 1017.71it/s]\u001b[A\n",
      " 19%|█▊        | 16805/90000 [00:16<01:12, 1007.96it/s]\u001b[A\n",
      " 19%|█▉        | 16914/90000 [00:16<01:10, 1029.46it/s]\u001b[A\n",
      " 19%|█▉        | 17025/90000 [00:16<01:09, 1050.11it/s]\u001b[A\n",
      " 19%|█▉        | 17135/90000 [00:16<01:08, 1064.36it/s]\u001b[A\n",
      " 19%|█▉        | 17243/90000 [00:16<01:08, 1068.84it/s]\u001b[A\n",
      " 19%|█▉        | 17351/90000 [00:16<01:08, 1068.11it/s]\u001b[A\n",
      " 19%|█▉        | 17458/90000 [00:16<01:09, 1047.28it/s]\u001b[A\n",
      " 20%|█▉        | 17563/90000 [00:16<01:09, 1039.66it/s]\u001b[A\n",
      " 20%|█▉        | 17672/90000 [00:16<01:08, 1052.65it/s]\u001b[A\n",
      " 20%|█▉        | 17781/90000 [00:17<01:08, 1061.01it/s]\u001b[A\n",
      " 20%|█▉        | 17890/90000 [00:17<01:07, 1069.25it/s]\u001b[A\n",
      " 20%|█▉        | 17998/90000 [00:17<01:07, 1068.69it/s]\u001b[A\n",
      " 20%|██        | 18105/90000 [00:17<01:11, 1001.33it/s]\u001b[A\n",
      " 20%|██        | 18207/90000 [00:17<01:13, 970.60it/s] \u001b[A\n",
      " 20%|██        | 18309/90000 [00:17<01:12, 982.74it/s]\u001b[A\n",
      " 20%|██        | 18414/90000 [00:17<01:11, 1001.56it/s]\u001b[A\n",
      " 21%|██        | 18515/90000 [00:17<01:12, 984.81it/s] \u001b[A\n",
      " 21%|██        | 18614/90000 [00:17<01:12, 985.87it/s]\u001b[A\n",
      " 21%|██        | 18716/90000 [00:18<01:11, 993.38it/s]\u001b[A\n",
      " 21%|██        | 18826/90000 [00:18<01:09, 1023.07it/s]\u001b[A\n",
      " 21%|██        | 18938/90000 [00:18<01:07, 1048.52it/s]\u001b[A\n",
      " 21%|██        | 19044/90000 [00:18<01:08, 1041.27it/s]\u001b[A\n",
      " 21%|██▏       | 19153/90000 [00:18<01:07, 1055.40it/s]\u001b[A\n",
      " 21%|██▏       | 19261/90000 [00:18<01:06, 1062.24it/s]\u001b[A\n",
      " 22%|██▏       | 19368/90000 [00:18<01:10, 998.22it/s] \u001b[A\n",
      " 22%|██▏       | 19469/90000 [00:18<01:10, 994.88it/s]\u001b[A\n",
      " 22%|██▏       | 19574/90000 [00:18<01:09, 1010.74it/s]\u001b[A\n",
      " 22%|██▏       | 19682/90000 [00:18<01:08, 1030.42it/s]\u001b[A\n",
      " 22%|██▏       | 19793/90000 [00:19<01:06, 1050.45it/s]\u001b[A\n",
      " 22%|██▏       | 19899/90000 [00:19<01:07, 1045.65it/s]\u001b[A\n",
      " 22%|██▏       | 20004/90000 [00:19<01:08, 1024.14it/s]\u001b[A\n",
      " 22%|██▏       | 20107/90000 [00:19<01:09, 1003.19it/s]\u001b[A\n",
      " 22%|██▏       | 20208/90000 [00:19<01:09, 1002.77it/s]\u001b[A\n",
      " 23%|██▎       | 20311/90000 [00:19<01:09, 1009.49it/s]\u001b[A\n",
      " 23%|██▎       | 20419/90000 [00:19<01:07, 1028.86it/s]\u001b[A\n",
      " 23%|██▎       | 20529/90000 [00:19<01:06, 1048.73it/s]\u001b[A\n",
      " 23%|██▎       | 20638/90000 [00:19<01:05, 1058.30it/s]\u001b[A\n",
      " 23%|██▎       | 20745/90000 [00:19<01:06, 1042.16it/s]\u001b[A\n",
      " 23%|██▎       | 20850/90000 [00:20<01:08, 1013.08it/s]\u001b[A\n",
      " 23%|██▎       | 20955/90000 [00:20<01:07, 1021.80it/s]\u001b[A\n",
      " 23%|██▎       | 21063/90000 [00:20<01:06, 1036.95it/s]\u001b[A\n",
      " 24%|██▎       | 21167/90000 [00:20<01:06, 1033.13it/s]\u001b[A\n",
      " 24%|██▎       | 21275/90000 [00:20<01:05, 1045.91it/s]\u001b[A\n",
      " 24%|██▍       | 21384/90000 [00:20<01:04, 1056.51it/s]\u001b[A\n",
      " 24%|██▍       | 21494/90000 [00:20<01:04, 1066.37it/s]\u001b[A\n",
      " 24%|██▍       | 21603/90000 [00:20<01:03, 1072.72it/s]\u001b[A\n",
      " 24%|██▍       | 21713/90000 [00:20<01:03, 1078.38it/s]\u001b[A\n",
      " 24%|██▍       | 21821/90000 [00:20<01:04, 1049.30it/s]\u001b[A\n",
      " 24%|██▍       | 21927/90000 [00:21<01:05, 1043.80it/s]\u001b[A\n",
      " 24%|██▍       | 22037/90000 [00:21<01:04, 1057.59it/s]\u001b[A\n",
      " 25%|██▍       | 22144/90000 [00:21<01:04, 1059.61it/s]\u001b[A\n",
      " 25%|██▍       | 22251/90000 [00:21<01:04, 1055.73it/s]\u001b[A\n",
      " 25%|██▍       | 22358/90000 [00:21<01:03, 1057.92it/s]\u001b[A\n",
      " 25%|██▍       | 22466/90000 [00:21<01:03, 1063.90it/s]\u001b[A\n",
      " 25%|██▌       | 22573/90000 [00:21<01:04, 1039.99it/s]\u001b[A\n",
      " 25%|██▌       | 22678/90000 [00:21<01:04, 1041.98it/s]\u001b[A\n",
      " 25%|██▌       | 22783/90000 [00:21<01:04, 1037.80it/s]\u001b[A\n",
      " 25%|██▌       | 22887/90000 [00:22<01:04, 1038.46it/s]\u001b[A\n",
      " 26%|██▌       | 22991/90000 [00:22<01:07, 989.33it/s] \u001b[A\n",
      " 26%|██▌       | 23100/90000 [00:22<01:05, 1016.75it/s]\u001b[A\n",
      " 26%|██▌       | 23208/90000 [00:22<01:04, 1033.20it/s]\u001b[A\n",
      " 26%|██▌       | 23317/90000 [00:22<01:03, 1046.86it/s]\u001b[A\n",
      " 26%|██▌       | 23424/90000 [00:22<01:03, 1051.52it/s]\u001b[A\n",
      " 26%|██▌       | 23532/90000 [00:22<01:02, 1059.34it/s]\u001b[A\n",
      " 26%|██▋       | 23642/90000 [00:22<01:01, 1070.34it/s]\u001b[A\n",
      " 26%|██▋       | 23751/90000 [00:22<01:01, 1073.29it/s]\u001b[A\n",
      " 27%|██▋       | 23859/90000 [00:22<01:04, 1023.85it/s]\u001b[A\n",
      " 27%|██▋       | 23962/90000 [00:23<01:06, 996.55it/s] \u001b[A\n",
      " 27%|██▋       | 24066/90000 [00:23<01:05, 1006.71it/s]\u001b[A\n",
      " 27%|██▋       | 24168/90000 [00:23<01:05, 1009.61it/s]\u001b[A\n",
      " 27%|██▋       | 24270/90000 [00:23<01:05, 1008.71it/s]\u001b[A\n",
      " 27%|██▋       | 24374/90000 [00:23<01:04, 1016.08it/s]\u001b[A\n",
      " 27%|██▋       | 24478/90000 [00:23<01:04, 1022.83it/s]\u001b[A\n",
      " 27%|██▋       | 24583/90000 [00:23<01:03, 1029.09it/s]\u001b[A\n",
      " 27%|██▋       | 24693/90000 [00:23<01:02, 1046.67it/s]\u001b[A\n",
      " 28%|██▊       | 24803/90000 [00:23<01:01, 1060.10it/s]\u001b[A\n",
      " 28%|██▊       | 24910/90000 [00:23<01:02, 1048.72it/s]\u001b[A\n",
      " 28%|██▊       | 25019/90000 [00:24<01:01, 1059.97it/s]\u001b[A\n",
      " 28%|██▊       | 25126/90000 [00:24<01:01, 1061.30it/s]\u001b[A\n",
      " 28%|██▊       | 25233/90000 [00:24<01:05, 996.22it/s] \u001b[A\n",
      " 28%|██▊       | 25334/90000 [00:24<01:05, 980.70it/s]\u001b[A\n",
      " 28%|██▊       | 25433/90000 [00:24<01:06, 966.76it/s]\u001b[A\n",
      " 28%|██▊       | 25531/90000 [00:24<01:08, 946.82it/s]\u001b[A\n",
      " 28%|██▊       | 25627/90000 [00:24<01:07, 948.00it/s]\u001b[A\n",
      " 29%|██▊       | 25727/90000 [00:24<01:06, 960.34it/s]\u001b[A\n",
      " 29%|██▊       | 25826/90000 [00:24<01:06, 965.89it/s]\u001b[A\n",
      " 29%|██▉       | 25924/90000 [00:25<01:06, 968.65it/s]\u001b[A\n",
      " 29%|██▉       | 26021/90000 [00:25<01:07, 945.01it/s]\u001b[A\n",
      " 29%|██▉       | 26116/90000 [00:25<01:08, 931.57it/s]\u001b[A\n",
      " 29%|██▉       | 26210/90000 [00:25<01:09, 919.97it/s]\u001b[A\n",
      " 29%|██▉       | 26303/90000 [00:25<01:09, 921.36it/s]\u001b[A\n",
      " 29%|██▉       | 26410/90000 [00:25<01:06, 960.05it/s]\u001b[A\n",
      " 29%|██▉       | 26507/90000 [00:25<01:06, 959.27it/s]\u001b[A\n",
      " 30%|██▉       | 26615/90000 [00:25<01:04, 990.09it/s]\u001b[A\n",
      " 30%|██▉       | 26715/90000 [00:25<01:04, 985.93it/s]\u001b[A\n",
      " 30%|██▉       | 26821/90000 [00:25<01:02, 1005.81it/s]\u001b[A\n",
      " 30%|██▉       | 26927/90000 [00:26<01:01, 1017.88it/s]\u001b[A\n",
      " 30%|███       | 27030/90000 [00:26<01:04, 981.73it/s] \u001b[A\n",
      " 30%|███       | 27140/90000 [00:26<01:02, 1012.94it/s]\u001b[A\n",
      " 30%|███       | 27242/90000 [00:26<01:02, 998.56it/s] \u001b[A\n",
      " 30%|███       | 27347/90000 [00:26<01:01, 1012.25it/s]\u001b[A\n",
      " 30%|███       | 27449/90000 [00:26<01:03, 981.48it/s] \u001b[A\n",
      " 31%|███       | 27548/90000 [00:26<01:04, 972.38it/s]\u001b[A\n",
      " 31%|███       | 27650/90000 [00:26<01:03, 985.92it/s]\u001b[A\n",
      " 31%|███       | 27754/90000 [00:26<01:02, 999.50it/s]\u001b[A\n",
      " 31%|███       | 27864/90000 [00:26<01:00, 1025.89it/s]\u001b[A\n",
      " 31%|███       | 27973/90000 [00:27<00:59, 1044.23it/s]\u001b[A\n",
      " 31%|███       | 28082/90000 [00:27<00:58, 1057.38it/s]\u001b[A\n",
      " 31%|███▏      | 28189/90000 [00:27<00:58, 1055.61it/s]\u001b[A\n",
      " 31%|███▏      | 28295/90000 [00:27<01:00, 1027.69it/s]\u001b[A\n",
      " 32%|███▏      | 28406/90000 [00:27<00:58, 1049.13it/s]\u001b[A\n",
      " 32%|███▏      | 28512/90000 [00:27<00:59, 1041.94it/s]\u001b[A\n",
      " 32%|███▏      | 28622/90000 [00:27<00:58, 1057.08it/s]\u001b[A\n",
      " 32%|███▏      | 28728/90000 [00:27<01:00, 1010.65it/s]\u001b[A\n",
      " 32%|███▏      | 28830/90000 [00:27<01:01, 999.52it/s] \u001b[A\n",
      " 32%|███▏      | 28937/90000 [00:28<00:59, 1018.41it/s]\u001b[A\n",
      " 32%|███▏      | 29046/90000 [00:28<00:58, 1036.40it/s]\u001b[A\n",
      " 32%|███▏      | 29150/90000 [00:28<00:59, 1022.17it/s]\u001b[A\n",
      " 33%|███▎      | 29255/90000 [00:28<00:59, 1029.36it/s]\u001b[A\n",
      " 33%|███▎      | 29364/90000 [00:28<00:57, 1046.37it/s]\u001b[A\n",
      " 33%|███▎      | 29472/90000 [00:28<00:57, 1052.95it/s]\u001b[A\n",
      " 33%|███▎      | 29578/90000 [00:28<01:00, 1007.00it/s]\u001b[A\n",
      " 33%|███▎      | 29680/90000 [00:28<01:00, 1004.83it/s]\u001b[A\n",
      " 33%|███▎      | 29781/90000 [00:28<01:00, 997.86it/s] \u001b[A\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 33%|███▎      | 29886/90000 [00:28<00:59, 1012.30it/s]\u001b[A\n",
      " 33%|███▎      | 29991/90000 [00:29<00:58, 1022.19it/s]\u001b[A\n",
      " 33%|███▎      | 30100/90000 [00:29<00:57, 1039.91it/s]\u001b[A\n",
      " 34%|███▎      | 30211/90000 [00:29<00:56, 1058.71it/s]\u001b[A\n",
      " 34%|███▎      | 30318/90000 [00:29<00:57, 1044.15it/s]\u001b[A\n",
      " 34%|███▍      | 30423/90000 [00:29<00:58, 1012.90it/s]\u001b[A\n",
      " 34%|███▍      | 30525/90000 [00:29<00:59, 1005.54it/s]\u001b[A\n",
      " 34%|███▍      | 30628/90000 [00:29<00:58, 1011.67it/s]\u001b[A\n",
      " 34%|███▍      | 30734/90000 [00:29<00:57, 1024.71it/s]\u001b[A\n",
      " 34%|███▍      | 30837/90000 [00:29<00:59, 1000.46it/s]\u001b[A\n",
      " 34%|███▍      | 30938/90000 [00:29<00:59, 993.70it/s] \u001b[A\n",
      " 34%|███▍      | 31041/90000 [00:30<00:58, 1002.33it/s]\u001b[A\n",
      " 35%|███▍      | 31144/90000 [00:30<00:58, 1008.02it/s]\u001b[A\n",
      " 35%|███▍      | 31248/90000 [00:30<00:57, 1015.93it/s]\u001b[A\n",
      " 35%|███▍      | 31355/90000 [00:30<00:56, 1031.50it/s]\u001b[A\n",
      " 35%|███▍      | 31463/90000 [00:30<00:56, 1043.91it/s]\u001b[A\n",
      " 35%|███▌      | 31568/90000 [00:30<00:56, 1026.11it/s]\u001b[A\n",
      " 35%|███▌      | 31671/90000 [00:30<00:57, 1007.20it/s]\u001b[A\n",
      " 35%|███▌      | 31772/90000 [00:30<00:58, 988.90it/s] \u001b[A\n",
      " 35%|███▌      | 31872/90000 [00:30<00:59, 985.20it/s]\u001b[A\n",
      " 36%|███▌      | 31974/90000 [00:31<00:58, 994.27it/s]\u001b[A\n",
      " 36%|███▌      | 32080/90000 [00:31<00:57, 1010.54it/s]\u001b[A\n",
      " 36%|███▌      | 32182/90000 [00:31<00:57, 1011.35it/s]\u001b[A\n",
      " 36%|███▌      | 32285/90000 [00:31<00:56, 1014.06it/s]\u001b[A\n",
      " 36%|███▌      | 32387/90000 [00:31<00:57, 1009.98it/s]\u001b[A\n",
      " 36%|███▌      | 32489/90000 [00:31<00:57, 1008.14it/s]\u001b[A\n",
      " 36%|███▌      | 32590/90000 [00:31<00:58, 973.14it/s] \u001b[A\n",
      " 36%|███▋      | 32692/90000 [00:31<00:58, 983.61it/s]\u001b[A\n",
      " 36%|███▋      | 32791/90000 [00:31<00:58, 973.22it/s]\u001b[A\n",
      " 37%|███▋      | 32899/90000 [00:31<00:56, 1002.94it/s]\u001b[A\n",
      " 37%|███▋      | 33009/90000 [00:32<00:55, 1029.47it/s]\u001b[A\n",
      " 37%|███▋      | 33113/90000 [00:32<00:55, 1023.23it/s]\u001b[A\n",
      " 37%|███▋      | 33216/90000 [00:32<00:57, 988.14it/s] \u001b[A\n",
      " 37%|███▋      | 33318/90000 [00:32<00:56, 995.08it/s]\u001b[A\n",
      " 37%|███▋      | 33418/90000 [00:32<00:56, 996.31it/s]\u001b[A\n",
      " 37%|███▋      | 33522/90000 [00:32<00:56, 1007.76it/s]\u001b[A\n",
      " 37%|███▋      | 33631/90000 [00:32<00:54, 1029.14it/s]\u001b[A\n",
      " 37%|███▋      | 33741/90000 [00:32<00:53, 1049.38it/s]\u001b[A\n",
      " 38%|███▊      | 33847/90000 [00:32<00:53, 1040.82it/s]\u001b[A\n",
      " 38%|███▊      | 33955/90000 [00:32<00:53, 1050.63it/s]\u001b[A\n",
      " 38%|███▊      | 34061/90000 [00:33<00:53, 1039.93it/s]\u001b[A\n",
      " 38%|███▊      | 34166/90000 [00:33<00:54, 1028.05it/s]\u001b[A\n",
      " 38%|███▊      | 34275/90000 [00:33<00:53, 1045.59it/s]\u001b[A\n",
      " 38%|███▊      | 34385/90000 [00:33<00:52, 1061.30it/s]\u001b[A\n",
      " 38%|███▊      | 34494/90000 [00:33<00:51, 1069.37it/s]\u001b[A\n",
      " 38%|███▊      | 34602/90000 [00:33<00:51, 1069.09it/s]\u001b[A\n",
      " 39%|███▊      | 34710/90000 [00:33<00:51, 1069.38it/s]\u001b[A\n",
      " 39%|███▊      | 34820/90000 [00:33<00:51, 1076.54it/s]\u001b[A\n",
      " 39%|███▉      | 34928/90000 [00:33<00:52, 1052.04it/s]\u001b[A\n",
      " 39%|███▉      | 35035/90000 [00:33<00:52, 1055.91it/s]\u001b[A\n",
      " 39%|███▉      | 35141/90000 [00:34<00:53, 1028.56it/s]\u001b[A\n",
      " 39%|███▉      | 35245/90000 [00:34<00:56, 976.55it/s] \u001b[A\n",
      " 39%|███▉      | 35345/90000 [00:34<00:55, 982.46it/s]\u001b[A\n",
      " 39%|███▉      | 35445/90000 [00:34<00:55, 986.95it/s]\u001b[A\n",
      " 40%|███▉      | 35552/90000 [00:34<00:53, 1010.20it/s]\u001b[A\n",
      " 40%|███▉      | 35654/90000 [00:34<00:54, 997.35it/s] \u001b[A\n",
      " 40%|███▉      | 35761/90000 [00:34<00:53, 1016.02it/s]\u001b[A\n",
      " 40%|███▉      | 35869/90000 [00:34<00:52, 1033.81it/s]\u001b[A\n",
      " 40%|███▉      | 35974/90000 [00:34<00:52, 1037.05it/s]\u001b[A\n",
      " 40%|████      | 36078/90000 [00:35<00:54, 993.59it/s] \u001b[A\n",
      " 40%|████      | 36178/90000 [00:35<00:54, 991.00it/s]\u001b[A\n",
      " 40%|████      | 36278/90000 [00:35<00:54, 988.89it/s]\u001b[A\n",
      " 40%|████      | 36383/90000 [00:35<00:53, 1003.34it/s]\u001b[A\n",
      " 41%|████      | 36492/90000 [00:35<00:52, 1027.14it/s]\u001b[A\n",
      " 41%|████      | 36600/90000 [00:35<00:51, 1042.22it/s]\u001b[A\n",
      " 41%|████      | 36710/90000 [00:35<00:50, 1057.51it/s]\u001b[A\n",
      " 41%|████      | 36821/90000 [00:35<00:49, 1069.84it/s]\u001b[A\n",
      " 41%|████      | 36929/90000 [00:35<00:49, 1064.91it/s]\u001b[A\n",
      " 41%|████      | 37037/90000 [00:35<00:49, 1068.96it/s]\u001b[A\n",
      " 41%|████▏     | 37145/90000 [00:36<00:50, 1036.71it/s]\u001b[A\n",
      " 41%|████▏     | 37249/90000 [00:36<00:51, 1022.55it/s]\u001b[A\n",
      " 42%|████▏     | 37352/90000 [00:36<00:52, 1000.71it/s]\u001b[A\n",
      " 42%|████▏     | 37453/90000 [00:36<00:53, 986.19it/s] \u001b[A\n",
      " 42%|████▏     | 37555/90000 [00:36<00:52, 995.18it/s]\u001b[A\n",
      " 42%|████▏     | 37656/90000 [00:36<00:52, 998.82it/s]\u001b[A\n",
      " 42%|████▏     | 37760/90000 [00:36<00:51, 1008.63it/s]\u001b[A\n",
      " 42%|████▏     | 37868/90000 [00:36<00:50, 1027.06it/s]\u001b[A\n",
      " 42%|████▏     | 37975/90000 [00:36<00:50, 1037.79it/s]\u001b[A\n",
      " 42%|████▏     | 38079/90000 [00:36<00:51, 1016.19it/s]\u001b[A\n",
      " 42%|████▏     | 38181/90000 [00:37<00:53, 969.74it/s] \u001b[A\n",
      " 43%|████▎     | 38279/90000 [00:37<00:53, 972.07it/s]\u001b[A\n",
      " 43%|████▎     | 38377/90000 [00:37<00:54, 954.66it/s]\u001b[A\n",
      " 43%|████▎     | 38473/90000 [00:37<00:54, 953.07it/s]\u001b[A\n",
      " 43%|████▎     | 38573/90000 [00:37<00:53, 965.93it/s]\u001b[A\n",
      " 43%|████▎     | 38677/90000 [00:37<00:52, 984.72it/s]\u001b[A\n",
      " 43%|████▎     | 38776/90000 [00:37<00:52, 984.16it/s]\u001b[A\n",
      " 43%|████▎     | 38875/90000 [00:37<00:53, 947.12it/s]\u001b[A\n",
      " 43%|████▎     | 38971/90000 [00:37<00:53, 945.38it/s]\u001b[A\n",
      " 43%|████▎     | 39072/90000 [00:38<00:52, 962.85it/s]\u001b[A\n",
      " 44%|████▎     | 39173/90000 [00:38<00:52, 975.03it/s]\u001b[A\n",
      " 44%|████▎     | 39281/90000 [00:38<00:50, 1001.95it/s]\u001b[A\n",
      " 44%|████▍     | 39382/90000 [00:38<00:51, 975.07it/s] \u001b[A\n",
      " 44%|████▍     | 39483/90000 [00:38<00:51, 983.76it/s]\u001b[A\n",
      " 44%|████▍     | 39582/90000 [00:38<00:51, 981.22it/s]\u001b[A\n",
      " 44%|████▍     | 39684/90000 [00:38<00:50, 991.49it/s]\u001b[A\n",
      " 44%|████▍     | 39793/90000 [00:38<00:49, 1017.10it/s]\u001b[A\n",
      " 44%|████▍     | 39895/90000 [00:38<00:50, 988.65it/s] \u001b[A\n",
      " 44%|████▍     | 39995/90000 [00:38<00:51, 963.08it/s]\u001b[A\n",
      " 45%|████▍     | 40096/90000 [00:39<00:51, 976.04it/s]\u001b[A\n",
      " 45%|████▍     | 40204/90000 [00:39<00:49, 1004.28it/s]\u001b[A\n",
      " 45%|████▍     | 40305/90000 [00:39<00:49, 1003.87it/s]\u001b[A\n",
      " 45%|████▍     | 40406/90000 [00:39<00:49, 1000.80it/s]\u001b[A\n",
      " 45%|████▌     | 40507/90000 [00:39<00:50, 973.79it/s] \u001b[A\n",
      " 45%|████▌     | 40606/90000 [00:39<00:50, 977.41it/s]\u001b[A\n",
      " 45%|████▌     | 40704/90000 [00:39<00:50, 973.09it/s]\u001b[A\n",
      " 45%|████▌     | 40811/90000 [00:39<00:49, 999.22it/s]\u001b[A\n",
      " 45%|████▌     | 40912/90000 [00:39<00:49, 998.16it/s]\u001b[A\n",
      " 46%|████▌     | 41013/90000 [00:39<00:50, 971.22it/s]\u001b[A\n",
      " 46%|████▌     | 41113/90000 [00:40<00:49, 977.78it/s]\u001b[A\n",
      " 46%|████▌     | 41211/90000 [00:40<00:49, 977.91it/s]\u001b[A\n",
      " 46%|████▌     | 41318/90000 [00:40<00:48, 1003.61it/s]\u001b[A\n",
      " 46%|████▌     | 41426/90000 [00:40<00:47, 1024.94it/s]\u001b[A\n",
      " 46%|████▌     | 41529/90000 [00:40<00:48, 1006.92it/s]\u001b[A\n",
      " 46%|████▋     | 41630/90000 [00:40<00:49, 977.14it/s] \u001b[A\n",
      " 46%|████▋     | 41729/90000 [00:40<00:49, 972.50it/s]\u001b[A\n",
      " 46%|████▋     | 41830/90000 [00:40<00:49, 982.98it/s]\u001b[A\n",
      " 47%|████▋     | 41929/90000 [00:40<00:50, 953.11it/s]\u001b[A\n",
      " 47%|████▋     | 42025/90000 [00:41<00:50, 946.42it/s]\u001b[A\n",
      " 47%|████▋     | 42125/90000 [00:41<00:49, 961.46it/s]\u001b[A\n",
      " 47%|████▋     | 42233/90000 [00:41<00:48, 993.22it/s]\u001b[A\n",
      " 47%|████▋     | 42338/90000 [00:41<00:47, 1008.49it/s]\u001b[A\n",
      " 47%|████▋     | 42446/90000 [00:41<00:46, 1027.27it/s]\u001b[A\n",
      " 47%|████▋     | 42550/90000 [00:41<00:47, 1006.55it/s]\u001b[A\n",
      " 47%|████▋     | 42651/90000 [00:41<00:48, 969.05it/s] \u001b[A\n",
      " 47%|████▋     | 42749/90000 [00:41<00:48, 968.03it/s]\u001b[A\n",
      " 48%|████▊     | 42852/90000 [00:41<00:47, 982.68it/s]\u001b[A\n",
      " 48%|████▊     | 42951/90000 [00:41<00:48, 967.47it/s]\u001b[A\n",
      " 48%|████▊     | 43050/90000 [00:42<00:48, 973.63it/s]\u001b[A\n",
      " 48%|████▊     | 43149/90000 [00:42<00:48, 975.88it/s]\u001b[A\n",
      " 48%|████▊     | 43249/90000 [00:42<00:47, 982.39it/s]\u001b[A\n",
      " 48%|████▊     | 43352/90000 [00:42<00:46, 995.74it/s]\u001b[A\n",
      " 48%|████▊     | 43452/90000 [00:42<00:48, 958.61it/s]\u001b[A\n",
      " 48%|████▊     | 43549/90000 [00:42<00:48, 958.45it/s]\u001b[A\n",
      " 49%|████▊     | 43653/90000 [00:42<00:47, 981.41it/s]\u001b[A\n",
      " 49%|████▊     | 43752/90000 [00:42<00:48, 956.52it/s]\u001b[A\n",
      " 49%|████▊     | 43855/90000 [00:42<00:47, 976.34it/s]\u001b[A\n",
      " 49%|████▉     | 43964/90000 [00:42<00:45, 1005.75it/s]\u001b[A\n",
      " 49%|████▉     | 44071/90000 [00:43<00:44, 1021.98it/s]\u001b[A\n",
      " 49%|████▉     | 44174/90000 [00:43<00:45, 996.41it/s] \u001b[A\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 49%|████▉     | 44276/90000 [00:43<00:45, 1001.79it/s]\u001b[A\n",
      " 49%|████▉     | 44379/90000 [00:43<00:45, 1009.25it/s]\u001b[A\n",
      " 49%|████▉     | 44481/90000 [00:43<00:46, 973.29it/s] \u001b[A\n",
      " 50%|████▉     | 44579/90000 [00:43<00:46, 970.50it/s]\u001b[A\n",
      " 50%|████▉     | 44677/90000 [00:43<00:46, 970.82it/s]\u001b[A\n",
      " 50%|████▉     | 44775/90000 [00:43<00:48, 940.67it/s]\u001b[A\n",
      " 50%|████▉     | 44870/90000 [00:43<00:48, 921.86it/s]\u001b[A\n",
      " 50%|████▉     | 44963/90000 [00:44<00:49, 911.96it/s]\u001b[A\n",
      " 50%|█████     | 45061/90000 [00:44<00:48, 929.62it/s]\u001b[A\n",
      " 50%|█████     | 45155/90000 [00:44<00:48, 915.25it/s]\u001b[A\n",
      " 50%|█████     | 45252/90000 [00:44<00:48, 928.98it/s]\u001b[A\n",
      " 50%|█████     | 45361/90000 [00:44<00:46, 970.38it/s]\u001b[A\n",
      " 51%|█████     | 45460/90000 [00:44<00:45, 975.36it/s]\u001b[A\n",
      " 51%|█████     | 45567/90000 [00:44<00:44, 1001.90it/s]\u001b[A\n",
      " 51%|█████     | 45676/90000 [00:44<00:43, 1024.63it/s]\u001b[A\n",
      " 51%|█████     | 45783/90000 [00:44<00:42, 1035.98it/s]\u001b[A\n",
      " 51%|█████     | 45889/90000 [00:44<00:42, 1041.47it/s]\u001b[A\n",
      " 51%|█████     | 45995/90000 [00:45<00:42, 1044.74it/s]\u001b[A\n",
      " 51%|█████     | 46101/90000 [00:45<00:41, 1049.12it/s]\u001b[A\n",
      " 51%|█████▏    | 46207/90000 [00:45<00:42, 1025.56it/s]\u001b[A"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-120-9485099dd3e4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtqdm\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m90000\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m     \u001b[0msample\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtrain_data2\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      9\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m<ipython-input-109-2f352a1334b0>\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, idx)\u001b[0m\n\u001b[1;32m     18\u001b[0m         \u001b[0mpt_path\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset_root\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mitem\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'pts_path'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     19\u001b[0m         \u001b[0mimg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimg_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m         \u001b[0mpt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpt_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     21\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msave_point\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     22\u001b[0m             \u001b[0msample\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'img'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mimg\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'label'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mpoint2label2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'pt'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mpt\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/.local/share/virtualenvs/mySuperPoint-tDjnSeaF/lib/python3.7/site-packages/numpy/lib/npyio.py\u001b[0m in \u001b[0;36mload\u001b[0;34m(file, mmap_mode, allow_pickle, fix_imports, encoding)\u001b[0m\n\u001b[1;32m    438\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    439\u001b[0m                 return format.read_array(fid, allow_pickle=allow_pickle,\n\u001b[0;32m--> 440\u001b[0;31m                                          pickle_kwargs=pickle_kwargs)\n\u001b[0m\u001b[1;32m    441\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    442\u001b[0m             \u001b[0;31m# Try a pickle\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/.local/share/virtualenvs/mySuperPoint-tDjnSeaF/lib/python3.7/site-packages/numpy/lib/format.py\u001b[0m in \u001b[0;36mread_array\u001b[0;34m(fp, allow_pickle, pickle_kwargs)\u001b[0m\n\u001b[1;32m    676\u001b[0m     \u001b[0mversion\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mread_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    677\u001b[0m     \u001b[0m_check_version\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mversion\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 678\u001b[0;31m     \u001b[0mshape\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfortran_order\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_read_array_header\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mversion\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    679\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    680\u001b[0m         \u001b[0mcount\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/.local/share/virtualenvs/mySuperPoint-tDjnSeaF/lib/python3.7/site-packages/numpy/lib/format.py\u001b[0m in \u001b[0;36m_read_array_header\u001b[0;34m(fp, version)\u001b[0m\n\u001b[1;32m    538\u001b[0m     \u001b[0;31m#   \"fortran_order\" : bool\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    539\u001b[0m     \u001b[0;31m#   \"descr\" : dtype.descr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 540\u001b[0;31m     \u001b[0mheader\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_filter_header\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mheader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    541\u001b[0m     \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    542\u001b[0m         \u001b[0md\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msafe_eval\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mheader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "from tqdm import tqdm\n",
    "\n",
    "start = datetime.now()\n",
    "\n",
    "for i in tqdm(range(90000)):\n",
    "    sample = train_data2[i]\n",
    "\n",
    "\n",
    "end = datetime.now()\n",
    "\n",
    "print((end-start).seconds)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "superpoint",
   "language": "python",
   "name": "superpoint"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
